﻿<Page x:Class="SsTool.Metadata.PropertyTypeMetadataPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="200" d:DesignWidth="500"
	Title="PropertyTypeMetadataPage">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" Orientation="Horizontal">
            <Button Name="_ctlBtnCreate" Content="Create" Margin="5" Click="_ctlBtnCreate_Click" />
            <Button Name="_ctlBtnUpdate" Content="更新"  Margin="5" Click="_ctlBtnUpdate_Click" />
            <Button Name="_ctlBtnDelete" Content="Delete" Margin="5"/>
        </StackPanel>
        <Border Grid.Row="1" Grid.Column="0" BorderThickness="1" BorderBrush="Black" Margin="5">
            <DataGrid Name="_ctlGrid" BorderThickness="0" CanUserAddRows="False" IsReadOnly="True" SelectionChanged="_ctlGrid_SelectionChanged" AutoGenerateColumns="False">
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=Name}" Header="Name"/>
                    <DataGridTextColumn Binding="{Binding Path=Caption}" Header="Caption" Width="*"/>
                    <DataGridTextColumn Binding="{Binding Path=DbType}" Header="DbType"/>
                    <DataGridTextColumn Binding="{Binding Path=MinLength}" Header="MinLength" />
                    <DataGridTextColumn Binding="{Binding Path=MaxLength}" Header="MaxLength" />
                </DataGrid.Columns>
            </DataGrid>
        </Border>
        <Border Grid.Row="1" Grid.Column="1" BorderThickness="1" BorderBrush="Black" Margin="5">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Button Grid.Row="0" Content="设置Parser" Name="_ctlBtnCreateParser" Click="_ctlBtnCreateParser_Click" />
                <DataGrid Grid.Row="1" Name="_ctlGridParser" BorderThickness="0" CanUserAddRows="False" IsReadOnly="True" AutoGenerateColumns="False">
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=Caption}" Header="Caption"/>
                        <DataGridTextColumn Binding="{Binding Path=Name}" Header="Name" Width="*"/>
                    </DataGrid.Columns>
                </DataGrid>
            </Grid>
        </Border>
    </Grid>
</Page>
